<?xml version="1.0" encoding="UTF-8"?>

<definitions id="definitions"
             xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
             targetNamespace="Examples">

    <process id="setServiceResultToProcessVariables" isExecutable="true">

        <startEvent id="theStart"/>

        <sequenceFlow sourceRef="theStart"
                      targetRef="valueExpressionServiceWithResultVariableNameSet"/>

        <serviceTask id="valueExpressionServiceWithResultVariableNameSet"
                     camunda:resultVariable="result"
                     camunda:expression="#{bean.value}"/>

        <sequenceFlow sourceRef="valueExpressionServiceWithResultVariableNameSet"
                      targetRef="valueExpressionServiceWithoutResultVariableNameSet"/>

        <serviceTask id="valueExpressionServiceWithoutResultVariableNameSet"
                     camunda:expression="#{bean.value}"/>

        <sequenceFlow sourceRef="valueExpressionServiceWithoutResultVariableNameSet"
                      targetRef="waitState"/>

        <userTask id="waitState"/>

        <sequenceFlow sourceRef="waitState" targetRef="theEnd"/>

        <endEvent id="theEnd"/>

    </process>

</definitions>
